<?php
include_once('../global.php');
$show = $_GET['show'];
$roundtext = array(
  1 => '第一轮',
  2 => '第二轮',
  3 => '决赛轮',
  4 => '',
);
$user_id=$_SESSION['user_id'];
if(empty($user_id)){//登录操作
    $_SESSION['redirect_url'] = $_SERVER['REQUEST_URI'];
    header('Location: /bmwjunior/mobile/login.php');
// 停止脚本执行
    exit;

}
$member_type=$_SESSION['type'];

if($member_type !=1){
    echo "<script>alert('只有球员或者家长才能参加');window.location.href='https://mapp.scoringchina.com/bmwjunior/mobile/matchevent.php?mt_id=4400&cls=7';</script>";
    exit;
}

$name=$birthday=$card_no=$tele="";
if($member_type==1){
    $sql = "SELECT * FROM `player` WHERE pl_id= '".$user_id."'";
    $res = $db->SelectSQL($sql);
    $name=$res?$res[0]['pl_cn_name']:"";
    $tele=$res?$res[0]['pl_tele']:"";
    $birthday=$res?$res[0]['pl_birthday']:"";
    $card_no=$res?$res[0]['pl_card_no']:"";
	$membercard_no=$res?$res[0]['wgwrname']:"";
}
if($member_type==2){
    $sql = "SELECT * FROM `bmw_member` WHERE user_id = '".$user_id."'";
    $res = $db->SelectSQL($sql);
    $name=$res?$res[0]['name']:"";
    $tele=$res?$res[0]['phone']:"";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <link href="<?php echo CSS_PATH ?>index.css" rel="stylesheet" type="text/css">
  <script type="text/javascript" src="<?php echo JS_PATH ?>jquery-1.8.3.min.js"></script>
  <script type="text/javascript" src="<?php echo JS_PATH ?>main.js"></script>
  <title>在线签到-<?php echo $match_cn_name ?></title>
  <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js "></script>

  <script>
    var url = location.href;
    var wxdata;
    //alert(url.split("&")[0]);
    //console.log(url.replace(/\&/g,"%26").replace(/\#/g,"%23"));
    $.ajax({
      type: "get",
      url: "../../interface/Bmwtnc/Home/gettoken/?url=" + encodeURIComponent(location.href.split('#')[0]),
      dataType: "jsonp",
      jsonp: "callback",
      jsonpCallback: "success_jsonpCallback",
      success: function(data) {
        //console.log(data);
        wxdata = data;
        wx.config({
          debug: false,
          appId: data.appId,
          timestamp: data.timestamp,
          nonceStr: data.nonceStr,
          signature: data.signature,
          jsApiList: [
            'onMenuShareTimeline', //
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'onMenuShareQZone'

          ]
        });
        //console.log(wxdata);
      },
      error: function(data) {
        // alert("连接失败！");
      }
    });

    wx.ready(function() {
      var shareData = {
        title: '<?php echo $match_cn_name ?>-当地规则',
        desc: '<?php echo $course_name ?>',
        link: url,
        imgUrl: 'https://mapp.scoringchina.com/bmwjunior/mobile/images/logo.png'
      };
      //alert(wxdata.url);
      //alert(url);
      wx.onMenuShareAppMessage(shareData); //分享给好友
      wx.onMenuShareTimeline(shareData); //分享到朋友圈
      wx.onMenuShareQQ(shareData); //分享给手机QQ
      wx.onMenuShareWeibo(shareData); //分享腾讯微博
      wx.onMenuShareQZone(shareData); //分享到QQ空间

    });
    wx.error(function(res) {
      //console.log(res);
      // alert(res.errMsg);//错误提示

    });





    $(document).ready(function() {
      ////console.log($('.pullrefresh').length)
      if ($('.pullrefresh').length > 0) {
        //pullrefresh.init();
      }
    });

    var mt_id = <?php echo $mt_id; ?>;
    var rd_id = <?php echo $rd_id; ?>;
    var mt_sts = '<?php echo $mt_sts; ?>';
    var mt_round = <?php echo $mt_round; ?>;
    var pl_id = <?php echo ($_GET['pl_id']) ? $_GET['pl_id'] : "''"; ?>;

    var time = 60 * 5; //自动刷新五分钟
    getdata(rd_id, true);


    function getdata(rd, isloading, divobj, contentobj, status, func) {
      if (isloading) {
        //$('#loadingimg').show();
      }

    }

    /*  滚动到顶部*/
    $(function() {
      $("#go_top").hide();
    })

    //scroll() 方法为滚动事件  
    $(window).scroll(function() {
      if ($(window).scrollTop() > 100) {
        $("#go_top").fadeIn(800);
      } else {
        $("#go_top").fadeOut(800);
      }
    });

    function gotottop() {
      $('body,html').animate({
        scrollTop: 0
      }, 100);
      return false;
    }

    function gotomain() {
      window.location = './main.php';
    }

    function goback() {
      window.history.back();
    }


    function gotourl(url) {
      window.location = url;
    }
  </script>



  <style>


    h1,
    h2 {
      text-align: center;
    }

    h1 {
      font-size: 25px;
    }

    h2 {
      font-size: 23px;
    }

 
  

    .highlight {
      font-weight: bold;
    }

    em {
      font-style: italic;
    }

  

    ol li {
      margin-bottom: 10px;
    }

    ul li {
      list-style-type: disc;
      margin-bottom: 5px;
    }

    .up {
      width: 40px;
      height: 40px;
      position: fixed;
      left: 2vw;
      bottom: 5vw;
    }

    #content_score {
      min-height: 20px;
      padding: 0px 0 0px;
      margin: 0;
    }

    #loadingimg {
      width: 40px;
      height: 40px;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      z-index: 999;
    }

    .radius_fillet3 {
      border-radius: 3px;
    }

    .tt_bar {
      height: 30px;
      border-bottom: 1px solid #e3e3e3;
    }

    .score_title2 {
      height: 30px;
      border-bottom: 1px solid #e3e3e3;
      text-indent: 14px;
    }

    .score_back {
      text-align: right;
      padding-right: 14px;
    }

    .bt_back {
      display: inline-block;
      width: 40px;
      height: 18px;
      line-height: 18px;
      cursor: pointer;
      border: 1px solid #363636;
      color: #363636;
      font-size: 12px;
      text-align: center;
    }

    .score_tround {
      height: 30px;
      line-height: 30px;
    }

    .score_tround span {
      color: #363636;
      float: right;
      font-size: 18px;
      height: 26px;
      line-height: 32px;
      margin-right: 15px;
      text-align: center;
      width: 50px;
    }

    .index_news {
      padding: 0 0;
      overflow: scroll;
      margin: 0;
      overflow-y: auto;
      /* 滑动效果 */
      height: calc(100vh - 10rem);
    }
  </style>
  <!--header-->
  <style>
    #navi_wait {
      height: 35px;
      background-color: #E3E3E3;
    }

    #navi_wait ul li {
      width: 32%;
      display: inline;
      float: left;
      /*line-height:33px;*/

      line-height: 36px;
      list-style-position: inside;
      border-bottom: 1px solid #A5A5A5;
      text-align: center;
    }

    #navi_wait ul li a {
      color: #767676;
      font-size: 19px;
      letter-spacing: 5px;
    }

    .scoringtable {
      border-radius: 10px;
      border-collapse: collapse;
      border-style: hidden;
      box-shadow: 0 0 0 1px #d8d8d8;
      overflow: hidden;
    }

    .topar {
      width: 90%;
      height: 28px;
      border-radius: 10px;
      margin: auto auto auto auto;
      color: #fff;
      display: flex;
      justify-content: center;
      align-items: center;

    }

    .undereven {
      font-weight: bolder;
      background-color: #B7001F;
      color: #fff;
    }

    .even {
      font-weight: bolder;
      background-color: #53565A;
      color: #fff;
    }


    .full {
      width: 100vw;
      height: 100vh;
      position: fixed;
      left: 0;
      top: 0;
      z-index: 99999;
    }

    .full img {
      width: 100%;
      height: 100%;
      position: absolute;
      object-fit: cover;
    }

    .full .codediv {
      top: 40%;
      left: 50%;
      position: absolute;
      z-index: 100000;
      width: 90%;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .full .codediv p {
      margin-bottom: 20px;
      text-align: center;
      width: 100%;
      font-size: 20px;
      font-weight: bolder;
    }

    .full .codediv .cn {
      margin-bottom: 20px;
      text-align: center;
      width: 100%;
      font-size: 18px;

    }

    .full .codediv .date {
      margin-bottom: 20px;
      text-align: center;
      width: 100%;
      font-size: 18px;
      color: #cfcfcf;
    }

    .full .codediv .codeinputs {

      width: 90%;
      margin-left: auto;
      margin-right: auto;
      display: flex;
      flex-dirction: row;
      justify-content: center;
      align-items: center;
    }

    .full .codediv .codeinputs input {
      border-radius: 10px;
      width: 50px;
      height: 50px;
      margin-left: auto;
      margin-right: auto;
      border: 1px solid #cfcfcf;
      font-size: 22px;
      font-weight: bolder;
      text-align: center;
    }

    .full .imgsponser {
      top: 20%;
      left: 50%;
      position: absolute;
      z-index: 100000;
      width: 100%;
      height: auto;
      transform: translate(-50%, -50%);
    }

    #sta {
      position: relative;
      z-index: 99;
      height: 80px;
      width: 100%;
      background-color: transparent;
      left: 0;
      top: 0;
    }

    .backhome {
      position: fixed;
      z-index: 1001;

      left: 2vw;
      bottom: 15vw;
    }

    #scoringlists {
      margin: 0;
    }

    .backhome img {
      width: 40px;
      height: 40px;
      border-radius: 100%;
    }

    .menulists {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      margin-top: 5px;
      margin-bottom: 5px;
    }

    .menulists .menu {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 70px;
      height: 70px;
      background: linear-gradient(180deg, #1067ac 0%, #1067ac 100%);
      color: #ffffff;
      border-radius: 10px;
      margin-left: auto;
      margin-right: auto;
    }

    .menulists .menu img {
      width: 40px;
      height: 40px;
      margin-top: 5px;
    }

    .menulists .menu text {
      display: flex;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      color: #fff;
      margin-top: 5px;
      margin-bottom: 5px;
    }

    /* 遮罩样式 */
    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      z-index: 999;
      display: none;
      /* 初始隐藏 */
    }

    /* 遮罩激活时显示 */
    .overlay.active {
      display: block;
    }

    /* 修正弹窗初始隐藏样式 */
    .popup {
      position: fixed;
      bottom: -100%;
      left: 0;
      width: 100%;
      background: #f5f5f5;
      color: #333;
      box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.2);
      transition: bottom 0.3s ease-in-out;
      border-top-left-radius: 20px;
      border-top-right-radius: 20px;
      z-index: 1000;
      display: none;
      /* 完全隐藏 */
    }

    /* 激活时显示 */
    .popup.active {
      bottom: 0;
      display: block;
    }

    .popup-header {
      padding: 15px;
      font-size: 20px;
      font-weight: bold;
      color: #444;
      border-bottom: 1px solid #ddd;
    }

    .popup-body {
      padding: 20px;
      font-family: Arial, sans-serif;
      line-height: 1.6;
      margin: 20px;
    }

    .popup-body input {
      width: calc(100% - 20px);
      padding: 10px;
      margin-bottom: 15px;
      border: 1px solid #ccc;
      border-radius: 8px;
      font-size: 16px;
      text-align: center;
      outline: none;
    }

    .popup-body input::placeholder {
      font-style: italic;
      color: #999;
    }

    .popup-body button {
      width: 100%;
      padding: 12px;
      background-color: #00aaff;
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 18px;
      cursor: pointer;
    }

    .popup-body button:active {
      background-color: #0088cc;
    }

    /* 隐私政策弹窗 */
    .policy-popup .policy-content {
      max-height: 400px;
      overflow-y: auto;
      margin-bottom: 20px;
      text-align: left;
      font-size: 14px;
      line-height: 1.6;
      color: #444;
    }
    .title-class{
      display: inline-block;
      width: 160px;
    }
  </style>
</head>

<body id="body">
  <div id="fullloading" class="full" onclick="closefullpre()" style="display:none;">
    <img id="imgfullloading" src="./images/pre.png" />


  </div>
  <div id="sta">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tbody>
        <tr>
          <td style="text-align:center;"><img src="./images/000.png" style="width:350px;height:80px" /></td>
          <!-- 右上角语言切换按钮 -->
						<div style="position: fixed; top: 30px; right: 10px; z-index: 1000;">
							<form method="get" style="margin: 0;">
								<button type="submit" name="lang" value="<?php echo $lang === 'CN' ? 'en' : 'CN'; ?>"
									style="background-color: transparent; color: #fff; border: none; padding: 5px 10px; border-radius: 5px; cursor: pointer;font-size:20px">
									<?php echo $lang === 'CN' ? 'EN' : 'CN'; ?>
								</button>
							</form>
						</div>
        </tr>
      </tbody>
    </table>
  </div>

  <img id="loadingimg" src="./images/icon_load.gif" style="display:none;" />
  <div id="content_score" style="">
    <div class="pullrefresh" style="display:none;"></div>

    <span style="display:none;" class="backhome"><a href="main.php?mt_id=<?php echo $mt_id ?>&rd_id=<?php echo $rd_id ?>"><img src="./images/home.png" /></a></span>

    <div class="index_news">
     <!-- 签到流程内容 -->
     <?php if ($lang === 'en') { ?>
          <!-- 签到流程内容 EN -->
          <div style="padding: 20px; text-align: left;" class="poppin">
              <h2 style="text-align: center; color: #fff;">Check-In Process</h2>
              <ol style="line-height: 1.8; font-size: 16px; margin: 0 20px;" class="poppin">
                  <li><strong>Step <font class="poppin">1</font>:</strong> Open the check-in page and ensure your device is connected to the internet.</li>
                  <li><strong>Step <font class="poppin">2</font>:</strong> Verify the player's information.</li>
                  <li><strong>Step <font class="poppin">3</font>:</strong> Review the disclaimer and submit your online signature.</li>
                  <li><strong>Important Notice:</strong> If you encounter any issues during the check-in process, please contact on-site staff or call the Organizing Committee at <a href="tel:8613120721859" style="color:#fff;"><font class="poppin">8613120721859</font></a>.</li>
              </ol>
          </div>
      <?php } else { ?>
          <!-- 签到流程内容 CN -->
          <div style="padding: 20px; text-align: left;">
              <h2 style="text-align: center; color: #fff;">签到流程</h2>
              <ol style="line-height: 1.8; font-size: 16px; margin: 0 20px;" class="poppin">
                  <li><strong>步骤 <font class="poppin">1</font>：</strong> 打开签到页面，确保设备已连接网络。</li>
                  <li><strong>步骤 <font class="poppin">2</font>：</strong> 确认球员信息</li>
                  <li><strong>步骤 <font class="poppin">3</font>：</strong> 确认免责声明书之后在线签字提交。</li>
                  <li><strong>注意事项：</strong> 如果在签到过程中遇到问题，请联系现场工作人员或拨打组委会电话<a href="tel:13120721859" style="color:#fff;"><font class="poppin">13120721859</font></a>。</li>
              </ol>
          </div>
      <?php } ?>


      <!-- 在线签到按钮 -->
      <div class="<?php echo $css_class; ?>" style="text-align: center; margin-top: 30px;">
        <button onclick="showPlayerInfoPopup()" style="
            background-color: #1067ac;
            color: white;
            font-size: 18px;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        ">
         <?php echo t('check_in'); ?>
        </button>

      </div>
    </div>

    <!-- 弹窗内容（球员信息） -->
    <div id="playerInfoPopup" style="
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    z-index: 1000;
    color: #000;
">
      <h3 style="text-align: center; margin-bottom: 20px; color: #1067ac;">球员信息</h3>
      <div style="margin-bottom: 10px;">
        <strong class="title-class">姓名：</strong> <span id="playerName"><?php echo $name;?></span>
      </div>
      <div style="margin-bottom: 10px;">
        <strong class="title-class">手机号：</strong> <span id="playerPhone" class="poppin"><?php echo $tele;?></span>
      </div>
      <div style="margin-bottom: 10px;">
        <strong class="title-class">身份证号：</strong> <span id="playerIdCard" class="poppin"><?php echo $card_no;?></span>
      </div>
      <div style="margin-bottom: 10px;">
        <strong class="title-class">生日：</strong> <span id="playerBirthday" class="poppin"><?php echo $birthday;?></span>
      </div>
	  <div style="margin-bottom: 20px;">
        <strong class="title-class">中高协会员卡号:</strong> <span id="playerMembercard_no" class="poppin"><?php echo $membercard_no;?></span>
      </div>
	  
      <div style="text-align: center;">
        <button onclick="confirmPlayerInfo()" style="
        background-color: #4CAF50;
        color: white;
        font-size: 16px;
        padding: 10px 20px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    ">
          确认
        </button>
      </div>
    </div>

    <!-- 遮罩层 -->
    <div id="overlay" style="
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
"></div>

    <!-- 底部弹窗内容（免责声明） -->
    <div class="overlay" id="policyOverlay" onclick="closeDisclaimerPopup()"></div>

    <div class="popup policy-popup" id="policyPopup">
      <div class="popup-header">免责声明</div>
      <div class="popup-body">
        <div class="policy-content">
          <h1><font class="poppin">2024</font><font class="poppin"> BMW</font>青少年高尔夫赛事</h1>
          <h2>免责声明书</h2>

          <h3>注意</h3>
          <p>华晨宝马汽车有限公司/宝马（中国）汽车贸易有限公司/ <font class="poppin">IMG</font>康体发展（上海）有限公司/中国高尔夫球协会/广州冯珊珊体育策划有限公司组织的<span class="highlight"><font class="poppin">[2024 BMW</font>中国青少年高尔夫球暨冯珊珊杯国际青少年高尔夫球锦标赛]</span>（以下称“比赛”或“赛事”）参赛球员（以下称“球员”）及陪同球员参赛的球员家长、监护人、家属、亲友、教练、领队或其他陪同人员（简称“球员陪同人员”）必须在获得允许参加本次比赛前，仔细阅读并签署本参加者声明书。签署本声明书即代表球员及球员陪同人员接受声明书条款并且自愿参加<span class="highlight"><font class="poppin">2024年12月9日至12月13日</font></span>在<span class="highlight">东莞观澜湖高尔夫球会</span>举办的本次赛事。</p>

          <p><em>(请球员家长/监护人阅读并填写该免责声明书)</em></p>

          <p>本免责声明书的签署人，球员的法定监护人，在此免除BMW青少年高尔夫赛事组委会（简称“组委会”）及其董事、代理、陪护人员、雇员、成员、所有权人、继任人及受让人因以上指名的球员和/或签字人在球员参加<span class="highlight"><font class="poppin">2024 BMW</font>青少年高尔夫赛事</span>（“比赛”）的途中或比赛期间所遭受的任何损失、财产毁损或身体精神伤害（包括但不限于被球车、球场器械致伤；被高尔夫球具、雨伞致伤；因特殊天气原因包括但不限于如高温、严寒、雷电等致伤；因运动过度致伤；在球场障碍区的意外伤害如跌落水中致伤；在赛事期间使用手推车不当致伤；在赛事期间被蛇、毒蜂、蚊虫鼠蚁等动物致伤；在赛事期间因食用过敏源致伤；在球场区域内摔跤滑倒致伤；在赛事期间/参赛途中/回程期间感染病毒或疾病；参赛途中以及回程期间的任何意外伤害；赛事期间在球场范围之外的任何意外伤害等）、死亡而产生或相关的一切责任、索赔、权利主张或诉讼请求，无论何种性质，且签署人进一步同意就组委会因上述球员而发生或承担的所有的责任、损失、赔偿金、合理的律师费用、辩护费用、其他开销、裁决请求，向组委会予以免责。</p>

          <p>签署人，作为上述命名球员的法定代理人，已充分了解到在参加高尔夫赛事及相关活动的途中及比赛过程中可能存在的危险和风险，在此自愿选择给予他们的书面批准。签署人作为上述命名球员的代理人在此自愿承担起与球员和/或签署人可能经受的所有损失、财产毁损或身体精神伤害（包括但不限于被球车、球场器械致伤；被高尔夫球具、雨伞致伤；因特殊天气原因包括但不限于如高温、严寒、雷电等致伤；因运动过度致伤；在球场障碍区的意外伤害如跌落水中致伤；在赛事期间使用手推车不当致伤；在赛事期间被蛇、毒蜂、蚊虫鼠蚁等动物致伤；在赛事期间因食用过敏源致伤；在球场区域内摔跤滑到致伤；在赛事期间/参赛途中/回程期间感染病毒或疾病；参赛途中以及回程期间的任何意外伤害；赛事期间在球场范围之外的任何意外伤害等）、死亡相关的一切风险。</p>

          <p>组委会指共同组织举办比赛的主体，包含华晨宝马汽车有限公司（简称华晨宝马）、宝马（中国）汽车贸易有限公司（简称宝马中国）、IMG康体发展（上海）有限公司（简称IMG）、中国高尔夫球协会（简称中高协）、广州冯珊珊体育策划有限公司（简称珊体）。</p>

          <p>此免责声明对球员及签署人的分销商、继承人、近亲、个人代表、遗嘱执行人、管理员、继任人和受让人亦具有法律约束力。</p>

          <p>此条款将于以上提及的日程（<font class="poppin">2024 BMW</font>青少年高尔夫赛事及其相关活动的所有日期）生效并具有完全的法律效力。</p>

          <p>在签署此条款过程中，每位签名人在此确认并声明：</p>
          <ol>
            <li>他/她已阅读以上提到的免责声明，理解并自愿签署此免责声明书。</li>
            <li>任何签署人，以法定监护人身份签字的，应是以下签名球员的真实法定监护人。且每位签名人需超过18周岁并身心健全，同时在以下签名球员了解本免责声明内容并许可的前提下签署。每位签署人充分理解到此免责声明书涉及以下签名球员和签署人的一切主张和索赔权。</li>
          </ol>

          <h2>参赛球员行为准则</h2>
          <p>为规范球员的比赛行为，培养球员的高尔夫球礼仪，营造健康的比赛氛围，保证正常的比赛秩序，由BMW青少年高尔夫赛事组织委员会（简称“组委会”）制定本准则，适用于每位获准参加<span class="highlight"><font class="poppin">2024 BMW</font>青少年高尔夫赛事</span>（简称“比赛”）的球员。</p>

          <h3>第一条</h3>
          <p>球员应遵守由苏格兰皇家古老高尔夫球俱乐部制定的最新的《高尔夫球规则》和中国高尔夫球协会翻译出版的中文版最新《高尔夫球规则》，以及由组委会制定的当地规则及比赛条件。</p>

          <h3>第二条</h3>
          <p>任何在比赛中产生的争议，均可请求裁判进行裁决，球员应尊重裁判的裁决。如球员对裁判的裁决有疑义，可向裁判长及组委会提出申诉，由裁判长及组委会根据申诉流程做出最终裁定。球员应及时就疑义问题提请裁判裁决，否则后果由球员自负。一组球员全部提交记分卡后，不再接受申诉。</p>

          <h3>第三条</h3>
          <p>球员应遵守《高尔夫球规则》第一章所规定的礼仪规范。在单场比赛中，裁判有权对违反高尔夫礼仪的行为进行判罚，第一次将被提出口头警告，第二次将被罚一杆，第三次将被取消本场比赛资格。</p>

          <h3>第四条</h3>
          <p>球员应对比赛场内的任何人给予尊重，在比赛中不得对任何人做出侮辱性或攻击性的语言及行为，违者将被取消本场比赛资格。</p>

          <h3>第五条</h3>
          <p>球员应在规定的时间内完成比赛，不得以任何理由故意拖延比赛，裁判有权对无故拖延比赛的行为进行判罚，第一次将被提出口头警告，第二次将被罚一杆，第三次将被取消本场比赛资格。</p>

          <h3>第六条</h3>
          <p>球员应爱护球场及组委会的设施及财物，如有损坏应由球员或球员监护人照价进行赔偿，故意损坏球场设施及组委会财产的球员，将被取消本场比赛资格。</p>

          <h3>第七条</h3>
          <p>球员应穿着组委会指定的衣帽参赛，球员有以下且不限于以下情况者严禁参赛：不穿着组委会指定衣帽的；穿着背心、无领T恤衫、牛仔裤、短于膝盖的短裤、高跟鞋的；暴露纹身图案的；衣冠不整，歪带球帽及其它违反高尔夫球礼仪不符的服饰等。组委会将根据比赛实际发生情况调整严禁参加比赛行为的内容。</p>

          <h3>第八条</h3>
          <p>球员陈述和保证，球员未收到任何检测结果表明该球员是传染病毒如<font class="poppin">H1N1、H1N5、</font>新冠病毒、或其他类似病毒以及与之相关的或由此产生的传染病或其他疾病的携带者。</p>

          <h3>第九条</h3>
          <p>球员应按组委会规定参加全部比赛及组委会安排的活动，如球员因故不参加某项活动，需事先向组委会请假并获得允许，如球员中途退出比赛，需告知裁判，并将被取消本场比赛资格。所有已报到的球员必须参加球员会议，在一个年度内累计两次报到后不参加球员会议或迟到超过十五分钟的，将被取消一次参赛资格。报到时须由本人亲自到场，不得由他人代行报到。</p>

          <h3>第十条</h3>
          <p>球员如发现任何人有违反《高尔夫球规则》、当地规则、组委会各项规定或其他任何妨碍比赛正常进行的行为，均可告知并制止违规人，或向裁判及组委会检举，但不得自行处罚。</p>

          <h3>第十一条</h3>
          <p>所有被取消比赛资格的球员，须立即跟随组委会工作人员离开比赛场地。对违反组委会规定的个人，组委会有权视情节轻重给予处罚，包括但不限于：取消本场比赛资格、取消参加组委会举办其他比赛的报名资格、向组委员提交书面检讨等。</p>

          <h3>第十二条</h3>
          <p>任何由球员行为所造成的法律后果，由当事人本人或其监护人承担全部法律责任，与组委会无关。</p>

          <h3>第十三条</h3>
          <p>组委会、官方赞助商及其各自的关联公司有权通过各种方法在各种媒体中使用和复制此比赛中的球员的个人元素（包括但不限于名称、肖像、形象、照片、影片和录音等），用于广告、宣传、和/或与比赛（以及未来比赛）及与组委会、官方赞助商各主体及其各自关联公司的开发相关的推广和其他事项、以及与比赛（以及未来比赛）及组委会、官方赞助商各主体及其各自关联公司相关的商业权利，并无需向球员本人或其监护人支付费用。</p>

          <h3>第十四条</h3>
          <p>组委会指共同组织举办比赛的主体，包含华晨宝马汽车有限公司（简称华晨宝马）、宝马（中国）汽车贸易有限公司（简称宝马中国）、IMG康体发展（上海）有限公司、中国高尔夫球协会（简称中高协）、广州冯珊珊体育策划有限公司（简称珊体）。官方赞助商指经由组委会认证的对比赛进行赞助的主体包括企业、单位、个人等。</p>

          <h3>第十五条</h3>
          <p>组委会依据中华人民共和国现行法律法规对本准则的进行解释。</p>

          <h2>疾病声明书</h2>
          <p>签署文件的家长或监护人确认允许该签字的参赛球员参加<span class="highlight"><font class="poppin">2024 BMW</font>青少年高尔夫赛事</span>（“比赛”），如果发生意外且需要医疗协助，球员的家长或监护人对球员接受上述医疗协助表示同意，比赛组委会和组委会指派的陪同人员不对此医疗协助担负法律责任。</p>

          <p>球员和家长对球员的身体健康情况充分认知，并确定球员身体健康，无任何过敏情况，传染病，或其他疾病，并确认球员的身体状况能够适应高尔夫运动和参加此比赛。如有患病史请家长通知组委会。</p>

          <p>特别的，球员和家长特此陈述和保证，球员未收到任何检测结果表明该球员是传染病毒如H1N1、H1N5、新冠病毒或其他类似病毒以及与之相关的或由此产生的传染病或其他疾病的携带者。</p>

          <p>组委会指共同组织举办比赛的主体，包含华晨宝马汽车有限公司（简称华晨宝马）、宝马（中国）汽车贸易有限公司（简称宝马中国）、IMG康体发展（上海）有限公司、中国高尔夫球协会（简称中高协）、广州冯珊珊体育策划有限公司（简称珊体）。</p>

          <h2>参赛球员陪同人员须知</h2>
          <p>为保证球员顺利进行比赛，维护比赛的正常秩序，由BMW青少年高尔夫赛事组织委员会（简称“组委会”）制定本须知，适用于每位获准参加<span class="highlight"><font class="poppin">2024 BMW</font>青少年高尔夫赛事</span>（简称“比赛”）的球员家长、监护人、家属、亲友、教练、领队或其他陪同人员（简称“球员陪同人员”）。</p>

          <h3>第一条</h3>
          <p>球员陪同人员不得以任何形式或任何理由干扰比赛的正常进行。</p>

          <h3>第二条</h3>
          <p>球员陪同人员应督促球员遵守《高尔夫规则》、比赛当地规则以及组委会的各项规定。</p>

          <h3>第三条</h3>
          <p>球员陪同人员应尊重组委会及裁判，服从裁判的裁决及组委会的决定。</p>

          <h3>第四条</h3>
          <p>球员陪同人员应遵守组委会关于球员陪同人员不得下场的规定，须在组委会规定的范围内观看比赛，任何球员陪同人员不得私自到规定范围以外观看比赛。</p>

          <h3>第五条</h3>
          <p>球员陪同人员应对比赛场内的任何人给予尊重，在比赛中不得对任何人做出侮辱性或攻击性的语言及行为。</p>

          <h3>第六条</h3>
          <p>球员陪同人员应爱护球场设施、组委会财物，如有损坏须照价赔偿。</p>

          <h3>第七条</h3>
          <p>球员陪同人员如发现任何人有违反《高尔夫球规则》、比赛当地规则、组委会规定及其他任何妨碍比赛正常进行的行为，都有权告知并制止违规当事人，或向裁判或组委会检举，但不得自行处罚。</p>

          <h3>第八条</h3>
          <p>球员陪同人员在陪同球员参赛期间，有如下行为的，组委会有权取消相应球员的参赛资格，并要求球员及球员陪同人员离开比赛场地。组委会还可视情节轻重，要求球员陪同人员提交手写书面检讨，或不再接受球员本人的报名。包括但不限于：任何违法行为；对任何人作出殴打、辱骂、恐吓等攻击性或侮辱性行为；故意损坏球场设施、组委会财物或其他人的财物；抢夺、藏匿、故意损坏任何比赛用品或球员球具；在比赛进行过程中到规定范围以外观看比赛；故意拖延比赛正常进行；欺骗或教唆球员欺骗对手、裁判或组委会；未经组委会允许在社交媒体上发布有损组委会或本次比赛的信息、扰乱赛场正常秩序等。组委会将根据比赛实际发生情况调整“违规”行为的内容。</p>

          <h3>第九条</h3>
          <p>球员陪同人员陈述和保证，球员陪同人员未收到任何检测结果表明该球员陪同人员是传染病毒如<font class="poppin">H1N1、H1N5、</font>新冠病毒以及与之相关的或由此产生的传染病或其他疾病的携带者。签署本须知，即表示球员陪同人员承认并自愿同意承担因参加比赛和/或比赛相关活动、进入比赛场地等发生的球员陪同人员的人身或财产安全损失、伤害、感染病毒、疾病、及所有风险和危险，并全权负责球员陪同人员因参加比赛和/或比赛相关活动而可能遭受或产生的任何伤害、疾病、损害、损失、索赔、责任或开销（“索赔”）。球员陪同人员特此同意解除或免除组委会及其雇员、高管、代理和代表因此类索赔（包括因此产生的或与之相关的全部责任、索赔、请求、诉讼、损害、成本或开销）而产生的责任，并同意承诺不就此提起诉讼，保护它们，使其免受损害。</p>

          <h3>第十条</h3>
          <p>任何由球员陪同人员行为所造成的法律后果，由当事人本人承担全部法律责任，与组委会无关。</p>

          <h3>第十一条</h3>
          <p>组委会、官方赞助商及其各自的关联公司有权通过各种方法在各种媒体中使用和复制此比赛中的球员和球员陪同人员的个人元素（包括但不限于名称、肖像、形象、照片、影片和录音等），用于广告、宣传、和/或与比赛（以及未来比赛）及与组委会、官方赞助商各主体及其各自关联公司的开发相关的推广和其他事项、以及与比赛（以及未来比赛）及组委会、官方赞助商各主体及其各自关联公司相关的商业权利，并无需向球员本人或其监护人支付费用。</p>

          <h3>第十二条</h3>
          <p>组委会指共同组织举办比赛的主体，包含华晨宝马汽车有限公司（简称华晨宝马）、宝马（中国）汽车贸易有限公司（简称宝马中国）、<font class="poppin">IMG</font>康体发展（上海）有限公司、中国高尔夫球协会（简称中高协、广州冯珊珊体育策划有限公司（简称珊体）。官方赞助商指经由组委会认证的对比赛进行赞助的主体包括企业、单位、个人等。</p>

          <h3>第十三条</h3>
          <p>组委会依据中华人民共和国现行法律法规对本准则的进行解释。</p>

          <h2>宝马儿童个人信息保护政策及监护人须知</h2>
          <p>宝马中国（以下简称“我们”）深知儿童（指未满十四周岁的任何自然人，下同）个人信息安全的重要性。我们秉承客户对宝马产品的高期待值而严谨对待我们的产品或服务中涉及的儿童的个人信息，承诺按业界成熟的安全标准，采取相应的安全保护措施以充分保护儿童的个人信息。</p>

          <p>本《宝马儿童个人信息保护政策及监护人须知》（以下简称“本政策”）旨在基于《宝马个人信息保护政策》，向监护人和儿童说明我们对儿童个人信息的处理规则。当本政策中的规则与《宝马个人信息保护政策》存在不一致时，本政策应优先适用；本政策未载明之处，则参照适用《宝马个人信息保护政策》中的规定。</p>

          <p><strong>最新更新日期：<font class="poppin">2024</font>年<font class="poppin">11</font>月</strong></p>

          <p>如果您对本政策内容有任何疑问、意见或建议，您可按照本政策第六部分中提供的方式与我们联系。</p>

          <p><strong>特别说明：</strong></p>
          <ol>
            <li>我们的产品和服务主要面向成年人。我们不会为儿童创建<font class="poppin">BMW ID</font>。原则上，我们也不会主动收集、使用儿童的个人信息。如您出于自身需求向我们提供儿童的个人信息的：
              <ul>
                <li>如果您是儿童的监护人，为了维护儿童的合法权益，您应当仔细阅读本政策，如果您不同意相关文件的内容，请您不要向我们提供儿童的个人信息。如果您发现我们在未事先获得可证实的监护人的同意的情形下收集或使用了儿童的个人信息，请您尽快与我们联系，我们会设法尽快删除相关账号和个人信息。</li>
                <li>如果您是儿童，您不应当独自获取我们的产品、网站和服务或向我们提供任何个人信息，您需要通知您的监护人阅读本政策并在您的监护人的确认下行事。</li>
              </ul>
            </li>
            <li>您通过签字，或点击“已阅读”、“同意”或其他类似选项，或接受我们提供的产品或服务，并向我们提交相关儿童的个人信息即视为您确保您有充分的权力、能力和权限进行相关操作且您已接受本政策，我们将按照相关法律法规及本政策合法使用和保护您提供的儿童个人信息。请您在勾选或点击“已阅读”、“同意”或其他类似选项，接受我们提供的产品或服务，填写、确认、授权导出或导入儿童个人信息，或者签署授权文件之前仔细阅读本政策，确保对其内容的含义及相应法律后果已全部知晓并充分理解。</li>
          </ol>

          <h3>一、我们的业务功能以及我们如何收集和使用儿童的个人信息</h3>
          <p>我们仅会出于本政策所述的以下目的而收集和使用儿童的个人信息。</p>

          <p><strong>（一）参加<font class="poppin">BMW</font>青少年高尔夫</strong></p>
          <p>当您参加我们举办的BMW青少年高尔夫活动时，如您携儿童共同参加，您需要向我们提供儿童的以下个人信息，从而完成BMW青少年高尔夫赛事报名与参与、保险购买等必要手续的办理：</p>
          <ul>
            <li>姓名</li>
            <li>性别</li>
            <li>参赛信息</li>
            <li>生日</li>
            <li>监护人手机号码</li>
            <li>证件类型及号码</li>
            <li>国籍</li>
            <li>中高协会员卡号</li>
          </ul>

          <p>请您理解，除上述明确涉及收集使用儿童的个人信息的场景以外，大多数情形下我们无法识别使用我们的产品与/或服务的用户是否属于儿童，或我们收集和使用的不具备明显年龄识别特征的个人信息是否属于儿童个人信息。在该等情况下，我们将按照《宝马个人信息保护政策》收集和处理相关的个人信息。如果您作为儿童的监护人，发现我们在该等情况下收集或使用了该儿童的个人信息而未事先获得可证实的监护人的单独同意，请您尽快与我们联系，我们会设法尽快删除相关个人信息。</p>

          <h3>二、我们如何对外提供儿童的个人信息</h3>
          <p>原则上，我们不会向任何第三方提供儿童的个人信息，但以下情形除外：</p>
          <ol>
            <li>向监护人提供。</li>
            <li>在向您提供产品或服务所必需的范围内，在符合本政策和《宝马个人信息保护政策》并取得您的明确授权同意的情况下或在按照相关法律法规及国家标准的要求的情况下对外提供。具体请查阅《宝马个人信息保护政策》中的“我们如何委托处理、共享、转让、公开披露您的个人信息”章节。</li>
          </ol>

          <h3>三、我们如何存储儿童的个人信息</h3>
          <p>（一）除《宝马个人信息保护政策》中另有规定或我们通过其他渠道另行告知说明的情况外，我们在中华人民共和国境内收集和产生的个人信息，将存储在中华人民共和国境内，其中涉及的儿童的个人信息不会被转移到中国境外管辖区，或者受到来自中国境外管辖区的访问。如果涉及境外传输, 我们将会另行征求您的同意，遵循相关法律法规的规定并确保相关儿童的个人信息得到在中国境内足够同等的保护。</p>

          <p>（二）我们会采取一切合理可行的措施，确保遵循合法、正当、必要和诚信的原则，仅收集为实现本政策所述目的所必需的个人信息。我们只会在达成本政策所述目的所需的期限内保留儿童的个人信息，除非确有需要延长保留期并获得您的单独授权同意、或根据法律法规或有关数据保留期的特别监管要求。</p>

          <p>（三）我们非常重视儿童的个人信息安全，已使用符合业界标准的严格安全防护措施保护您提供的儿童的个人信息，防止儿童的个人信息遭到未经授权访问、公开披露、使用、修改、损坏或丢失。我们会采取一切合理可行的措施，保护儿童的个人信息。例如，我们会使用加密技术确保数据的保密性；我们会使用受信赖的保护机制防止数据遭到恶意攻击；我们会部署访问控制机制，确保只有授权人员才可访问儿童的个人信息；我们会在事前进行个人信息保护影响评估并对处理情况进行记录；以及我们会定期举办安全和隐私保护培训课程，加强员工对于保护儿童的个人信息重要性的认识。</p>

          <p>（四）互联网环境并非百分之百安全，我们提示您作为儿童的监护人应当正确履行监护职责，积极采取措施保护儿童个人信息权益。</p>

          <p>（五）一旦发生儿童个人信息安全事件，我们会立即启动应急预案，采取补救措施，并按照法律法规的要求将事件相关情况以邮件、信函、电话、推送通知等方式向您进行告知；难以逐一告知的，我们会通过合理、有效的方式发布相关警示信息。</p>

          <h3>四、您的权利</h3>
          <p>按照中国相关的法律、法规、标准，以及其他国家、地区的通行做法，我们保障儿童对个人信息的权利。您可以查阅《宝马个人信息保护政策》中的“您的权利”章节，了解您如何针对儿童的个人信息行使访问、查阅、复制、更正、删除等权利，如何改变授权同意的范围或撤回同意，以及如何注销账号。</p>

          <p>特别地，除《宝马个人信息保护政策》中规定的情形外，下列情形中，您作为儿童的监护人也可联系我们要求删除相应的儿童信息：</p>
          <ol>
            <li>我们违反法律、行政法规的规定或者双方的约定收集、存储、使用、转移、披露儿童个人信息的；</li>
            <li>超出目的范围或者必要期限收集、存储、使用、转移、披露儿童信息的；</li>
            <li>监护人撤回同意的；</li>
            <li>监护人通过注销等方式终止使用产品或者服务的。</li>
          </ol>

          <h3>五、本政策如何更新</h3>
          <p>本政策可能变更。未经明确同意，我们不会削减您按照本政策所应享有的权利。我们会在本页面上发布对本政策所做的任何变更。我们会将本政策的旧版本存档，供您查阅。对于重大变更，我们还会提供更为显著的通知。具体请查阅《宝马个人信息保护政策》中的“本政策如何变更”章节。</p>

          <h3>六、如何联系我们</h3>
          <p>如果您对本政策或对儿童个人信息保护事宜有任何疑问、意见或建议，请通过以下方式与我们联系：</p>
          <p>邮箱：<font class="poppin">servicecenter@bmw.com.cn</font></p>
          <p>联系方式：<font class="poppin">400-800-6666</font></p>
          <p>宝马（中国）汽车贸易有限公司数据治理部，注册地址：中国北京市朝阳区东三环北路霞光里18号佳程广场<font class="poppin">B</font>座<font class="poppin">28</font>层，邮编：<font class="poppin">100027</font></p>

          <p>我们将在验证您（包括儿童与监护人）的身份后受理请求，并在十五个工作日内完成核查和处理。</p>

          <p><strong>本人已全部阅读本须知，并愿意自觉遵守本须知的各项条款。</strong></p>

          <p>您通过签字即视为您已接受上述各项条款，在签署授权文件之前仔细阅读本须知的各项条款，确保对其内容的含义及相应法律后果已全部知晓并充分理解。</p>

          <p><strong>参赛球员、家长、陪同人员确认并同意以上《免责声明书》、《参赛球员行为准则》、《疾病声明书》、《参赛球员陪同人员须知》、《宝马儿童个人信息保护政策及监护人须知》的内容，请签署</strong></p>

        </div>
        <button onclick="confirmDisclaimer()">确认</button>
      </div>
    </div>

    <div class="popup policy-popup poppin" id="policyPopup-en">
      <div class="popup-header">Disclaimer</div>
      <div class="popup-body">
        <div class="policy-content">
          <h1>BMW GOLF NEXTGEN FENG SHANSHAN CUP INTERNATIONAL CHAMPIONSHIP 2024 DISCLAIMER</h1>
          <h2>Attention</h2>
          <p>Player participating in the [2024 BMW Golf NextGen Feng Shanshan Cup International Championship]
            (hereinafter referred to as the "Tournament") organized by BMW Brilliance Automotive Ltd./BMW China
            Automotive Trading Ltd./IMG Sports Development (Shanghai) Ltd./China Golf Association/Guangzhou Feng
            Shanshan Sports Planning Co., Ltd. (hereinafter referred to as “player”) and any accompanying parents,
            guardians, family members, relatives, coaches, team leaders, or other accompanying individuals (hereinafter
            referred to as the player’s "accompanying personnel") must carefully read and sign this Disclaimer before
            being permitted to participate in the Tournament, scheduled to be held from December 9th to December 13th,
            2024, at Mission Hills Golf Club, Dongguan. By signing this document, players and their accompanying
            personnel agree to the terms of the Disclaimer and voluntarily participate in the Tournament.</p>

          <p><em>(Parents/guardians of players are required to read and complete this Disclaimer.)</em></p>

          <p>The undersigned, the legal guardian of the player, hereby releases the BMW Golf NextGen Feng Shanshan Cup
            International Championship Organizing Committee (referred to as the "Organizing Committee") and its
            directors, agents, escorts, employees, members, owners, successors, and assignees from any liabilities,
            claims, demands, or legal actions of any nature arising from or related to losses, property damages,
            physical or mental injuries (including but not limited to injuries caused by golf carts, course equipment,
            golf gear, umbrellas; extreme weather conditions such as high temperature, coldness, or lightning; excessive
            exercises; accidents in water and other hazards; improper use of trolleys during the Tournament; animal
            bites from snakes, insects, or rodents during the Tournament; food allergens during the Tournament; slipping
            or falling in the course; infections or diseases contracted during or en route to/from the Tournament; any
            accident en route to/from the Tournament; any trauma incurred outside the course during the Tournament,
            etc.) or death incurred to the player and/or the undersigned during or en route to the 2024 BMW Golf NextGen
            Feng Shanshan Cup International Championship Tournament. The undersigned further agrees to indemnify the
            Organizing Committee for any liabilities, losses, compensation, reasonable legal fees, defense fees, and
            other expenses and ruled judgements that are incurred to or suffered by the Organizing Committee due to the
            player.</p>

          <p>The undersigned, as the legal representative of the player, fully understands the risks and dangers
            associated with participating in the golf tournament and related activities, and voluntarily provides
            written consent for their participation. The undersigned voluntarily assumes all risks of losses, property
            damage, injuries, or death as described above.</p>

          <p>The Organizing Committee includes the entities organizing the Tournament: BMW Brilliance Automotive Ltd.
            (“BMW Brilliance”), BMW China Automotive Trading Ltd. (“BMW China”), IMG Sports Development (Shanghai) Ltd.
            (“IMG”), China Golf Association (“CGA”), and Guangzhou Shanshan Feng Sports Planning Co., Ltd. (“Shanshan
            Sports”).</p>

          <p>This Disclaimer is legally binding on the player, the undersigned, their distributors, heirs, close
            relatives, personal representatives, executors, administrators, successors, and assignees.</p>

          <p>This Disclaimer takes effect on the agenda mentioned above (including all dates of the 2024 BMW Golf
            NextGen Feng Shanshan Cup International Championship and all associated activities), with full legal
            validity.</p>

          <p><strong>Acknowledgment by signatories:</strong></p>
          <ol>
            <li>They have read and understood the above Disclaimer and voluntarily agree to its terms.</li>
            <li>Any individual signing on behalf of a player, in the capacity of his/her legal guardian, affirms to be
              the legitimate guardian of the named player. Each signatory must be over 18 years old, physically and
              mentally competent, and have the consent of the named player to sign after the named player has
              acknowledged the content of this Disclaimer. Each Signatory fully understand all claim and action rights
              that concerns the undersigned player and signatory below under this Disclaimer.</li>
          </ol>

          <h2>Code of Conduct for Participants</h2>
          <p>To standardize the conduct of players, cultivate golf etiquette, foster a healthy competition atmosphere,
            and ensure the orderly progress of the tournament, the 2024 BMW Golf NextGen Feng Shanshan Cup International
            Championship Organizing Committee (hereinafter referred to as the "Organizing Committee") has established
            the following code of conduct. These rules apply to all players permitted to participate in the 2024 BMW
            Golf NextGen Feng Shanshan Cup International Championship (hereinafter referred to as the "Tournament").</p>

          <ol>
            <li>Players must comply with the latest edition of the Rules of Golf established by The Royal and Ancient
              Golf Club of St Andrews and the latest Chinese version published by the China Golf Association, as well as
              local rules and competition conditions set by the Organizing Committee.</li>
            <li>In the event of a dispute during the competition, players may request a ruling from a referee and must
              respect the referee's decision. If a player disputes the ruling, they may appeal to the chief referee and
              the Organizing Committee. The final decision will be made following the appeal process. Players must raise
              any disputes promptly; failure to do so will result in personal responsibility for the consequences.
              Appeals will not be accepted after the entire group submits their scorecards.</li>
            <li>Players must adhere to the etiquette guidelines specified in Chapter 1 of the Rules of Golf. Referees
              may impose penalties for breaches of golf etiquette: during each match, a verbal warning for the first
              violation, a one-stroke penalty for the second, and disqualification for the third.</li>
            <li>Players must show respect to everyone on the course. Insulting or aggressive language or behavior
              towards anyone will result in disqualification during the matches.</li>
            <li>Players must complete their rounds within the allotted time and shall not intentionally delay the
              matches. Referees have the authority to penalize delays: a verbal warning for the first instance, a
              one-stroke penalty for the second, and disqualification for the third.</li>
            <li>Players must protect the course and the Organizing Committee's facilities and properties. Any damages
              must be compensated by the player or their guardian in market price. Intentional damage will result in
              disqualification.</li>
            <li>Players must wear the attire designated by the Organizing Committee. Players will not be permitted to
              compete under the conditions including but not limited to where they:
              <ul>
                <li>Fail to wear the attire designated by the Organizing Committee,</li>
                <li>Wear vests, collarless T-shirts, jeans, shorts above the knees, high heels, or other inappropriate
                  clothing,</li>
                <li>Display tattoos,</li>
                <li>Wear hats improperly, or</li>
                <li>Violate golf etiquette with inappropriate attire.</li>
              </ul>
              The Organizing Committee reserves the right to adjust the prohibited behaviors based on the actual
              situations.
            </li>
            <li>Players represent and warrant that they have not received any positive test results indicating they
              carry contagious viruses such as H1N1, H1N5, COVID-19, or similar infectious diseases.</li>
            <li>Players must participate in all events and activities arranged by the Organizing Committee. Players
              unable to attend any activity must request leave and receive approval in advance. Players withdrawing from
              a match before conclusion must notify a referee and will be disqualified. All players must attend player
              meetings. Failing to attend two meetings or being more than 15 minutes late twice in one year will result
              in disqualification from one match. Players must report in person and cannot delegate others to register
              on their behalf.</li>
            <li>Players who discover any violations of the Rules of Golf, local rules, or Organizing Committee’s
              regulations must report or stop the violation and notify referees or the Organizing Committee. Players
              must not penalize others themselves.</li>
            <li>Disqualified players must immediately leave the course with the Organizing Committee's staff. Violations
              of the rules may result in penalties, including but not limited to disqualification for the current match,
              bans from future matches, or submission of a written explanation to the Organizing Committee, etc.</li>
            <li>Any legal consequences resulting from a player's actions are the responsibility of the player or their
              guardian and are unrelated to the Organizing Committee.</li>
            <li>The Organizing Committee, official sponsors, and their respective affiliates reserve the right to use
              and reproduce a player’s personal elements (including but not limited to name, portrait, image, photos,
              videos, and recordings) in various methods through various media for advertisement and promotion, or other
              related activities or commercial rights developed or related to the Organizing Committee, official
              sponsors and their respective affiliates in connection with this Tournament and future tournaments without
              compensation to the player or their guardian.</li>
            <li>The Organizing Committee refers to entities jointly organizing the Tournament, including BMW Brilliance
              Automotive Ltd., BMW China Automotive Trading Ltd., IMG Sports Development (Shanghai) Ltd., China Golf
              Association, and Guangzhou Shanshan Feng Sports Planning Co., Ltd. Official sponsors refer to the
              Tournament sponsors certified by the Organizing Committee, including companies, organizations, and
              individuals.</li>
            <li>The Organizing Committee retains the right to interpret this code of conduct under current China’s laws
              and regulations.</li>
          </ol>

          <h2>Medical Declaration</h2>
          <p>The undersigned parent or guardian consents to the participation of the named player in the 2024 BMW Golf
            NextGen Feng Shanshan Cup International Championship (the "Tournament"). In case of an accident requiring
            medical assistance, the parent or guardian agrees to the player receiving necessary medical care and
            acknowledges that the Organizing Committee and its designated personnel bear no legal liability for such
            assistance.</p>

          <p>The player and parent confirm to have full acknowledgement of the player’s health conditions, and confirm
            that the player is in good health, free from allergies, infectious diseases, or other conditions, and is
            physically fit to participate in golf activities and this Tournament. The parent or guardian must notify the
            Organizing Committee if the player has a medical history.</p>

          <p>Specifically, the player and parent represent and warrant that the player has not received any test results
            indicating they are a carrier of infectious viruses such as H1N1, H1N5, COVID-19, or similar diseases.</p>

          <p>The Organizing Committee includes BMW Brilliance Automotive Ltd., BMW China Automotive Trading Ltd., IMG
            Sports Development (Shanghai) Ltd., the China Golf Association, and Guangzhou Shanshan Feng Sports Planning
            Co., Ltd.</p>

          <h2>Guidelines for Accompanying Personnel</h2>
          <p>To provide the players with smooth competition experience and maintain proper order at the Tournament, the
            2024 BMW Golf NextGen Feng Shanshan Cup International Championship Organizing Committee (hereinafter
            referred to as the "Organizing Committee") has established the following guidelines. These Guidelines apply
            to all parents, guardians, family members, relatives, coaches, team leaders, or other accompanying
            individuals (hereinafter referred to as "Accompanying Personnel") of players permitted to participate in the
            2024 BMW Golf NextGen Feng Shanshan Cup International Championship (referred to as the "Tournament").</p>

          <ol>
            <li>Accompanying Personnel must not interfere with the normal progress of the Tournament in any form or for
              any reason.</li>
            <li>Accompanying Personnel should ensure that players comply with the Rules of Golf, local tournament rules,
              and regulations set by the Organizing Committee.</li>
            <li>Accompanying Personnel must respect the referees and the Organizing Committee, comply with the referees’
              decisions, and adhere to the Organizing Committee's rulings.</li>
            <li>Accompanying Personnel must abide by the Organizing Committee’s rule on prohibiting them from entering
              the course during play. They must watch the Tournament from designated areas and must not enter restricted
              areas without permission.</li>
            <li>Accompanying Personnel must show respect to everyone on the course and must not engage in any insulting
              or aggressive language or behavior toward anyone.</li>
            <li>Accompanying Personnel must protect the facilities and properties of the golf course and the Organizing
              Committee. Any damages must be compensated at cost.</li>
            <li>Accompanying Personnel who observe violations of the Rules of Golf, local tournament rules, or
              Organizing Committee regulations, or any behavior disrupting the Tournament, must report these to the
              referees or the Organizing Committee and must not impose penalties themselves.</li>
            <li>Accompanying Personnel who engage in the following behavior during the Tournament may lead to the
              disqualification of the associated player, and the Organizing Committee may request the player and the
              accompanying personnel to leave the Tournament venue. The Organizing Committee may also require a written
              explanation from the Accompanying Personnel or prohibit future participation of the player based on the
              actual situations. Actions include, but are not limited to:
              <ul>
                <li>Any illegal activities,</li>
                <li>Insulting, threatening, or physically attacking anyone,</li>
                <li>Intentionally damaging course facilities, properties of the Organizing Committee, or others’
                  belongings,</li>
                <li>Tampering with, hiding, or damaging tournament equipment or players' golf gear,</li>
                <li>Accessing restricted areas during the Tournament,</li>
                <li>Deliberately delaying the Tournament,</li>
                <li>Deceiving or encouraging players to deceive opponents, referees, or the Organizing Committee,</li>
                <li>Posting harmful or inappropriate information about the Organizing Committee or the Tournament on
                  social media without permission,</li>
                <li>Interrupting the normal continuation of the Tournament.</li>
              </ul>
              The Organizing Committee reserves the right to adjust the list of prohibited behaviors based on actual
              circumstances.
            </li>
            <li>Accompanying Personnel represent and warrant that they have not received any positive test results
              indicating they are carriers of infectious viruses such as H1N1, H1N5, COVID-19, or similar diseases. By
              signing these guidelines, Accompanying Personnel acknowledge and voluntarily assume all risks and dangers
              associated with Accompanying Personnel in participating the Tournament and/or related activities as well
              as entering the Tournament venue, etc., including personal or property loss, injuries, infections,
              illnesses, and any other risks or dangers; will fully bear any damages, illness, losses, claims,
              liabilities or expenses incurred to the Accompanying Personnel in participating the Tournament and/or the
              related activities (“Claims”); and hereby agree to release or exempt the Organizing Committee and its
              employees, officers, agents and representatives from any liabilities attributable to such Claims,
              including any liabilities, claims, requests, litigations, damages, costs or expenses arising from or in
              connection with such Claims. The Accompanying Personnel also agree not to therefore raise any litigation
              against such persons, and will protect such persons and hold them harmless in this regard.</li>
            <li>Any legal consequences resulting from the actions of Accompanying Personnel are the sole responsibility
              of the individuals involved and are unrelated to the Organizing Committee.</li>
            <li>The Organizing Committee, official sponsors, and their respective affiliates reserve the right to use
              and reproduce the personal elements of players and Accompanying Personnel (including but not limited to
              names, portraits, images, photos, videos, and recordings) in any method through various media for
              advertisement and promotion, and other activities or commercial rights developed or related to the
              Organizing Committee, official sponsors and their respective affiliates in connection with this Tournament
              and the future tournaments, without compensation.</li>
            <li>The Organizing Committee includes BMW Brilliance Automotive Ltd., BMW China Automotive Trading Ltd., IMG
              Sports Development (Shanghai) Ltd., the China Golf Association, and Guangzhou Shanshan Feng Sports
              Planning Co., Ltd. Official sponsors refer to the Tournament sponsors certified by the Organizing
              Committee, including companies, organizations, and individuals.</li>
            <li>The Organizing Committee retains the right to interpret these guidelines under current China’s laws and
              regulations.</li>
          </ol>

          <p><strong>I have thoroughly read and agree to comply with all the terms and conditions outlined in this
              document.</strong></p>
          <p>By signing below, you confirm to have accepted the above terms and conditions, and you confirm to have
            carefully read this document before signing. You fully understand its content and the associated legal
            implications.</p>
          <p><strong>The participating player, parents, and accompanying personnel hereby confirm and agree to the
              content of the above Disclaimer, Code of Conduct for Participants, Medical Declaration, and Guidelines for
              Accompanying Personnel. Please sign below:</strong></p>

          <p>Player's Signature: _______________________</p>
          <p>Accompanying Personnel's Signature: _______________________</p>
          <p>Date: _______________________</p>

        </div>
        <button onclick="confirmDisclaimer()">Confirm</button>
      </div>
    </div>


    <!-- 遮罩层 -->
    <div id="overlay" style="
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
"></div>

    <!-- 弹窗内容 -->
    <div id="signaturePopup" style="
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    z-index: 1000;
">
      <h3 style="text-align: center; margin-bottom: 20px; color: #1067ac;" class="<?php echo $css_class; ?>"> <?php echo t('electronic_signature'); ?></h3>
        
      <canvas id="signatureCanvas" style="
        border: 1px solid #ccc;
        width: 100%;
        height: 200px;
        border-radius: 5px;
    "></canvas>
      <div class="<?php echo $css_class; ?>" style="margin-top: 20px; text-align: center;">
        <button onclick="clearCanvas()" style="
            background-color: #f44336;
            color: white;
            font-size: 16px;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            margin-right: 10px;
            cursor: pointer;
        ">
          <?php echo t('clear'); ?>
        </button>
        <button onclick="submitSignature()" style="
            background-color: #4CAF50;
            color: white;
            font-size: 16px;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        ">
          <?php echo t('submit'); ?>
        </button>
      </div>
    </div>

    <!-- 遮罩层 -->
    <div id="overlay" style="
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
"></div>

    <img src="images/up.png" class="up" id="go_top" onclick="gotottop();">
    <div class="bottommenu">
    <div class="<?php echo $css_class; ?>" onclick="gotomain()"><?php echo t('back'); ?></div>    <div class="<?php echo $css_class; ?>" onclick="gotomain()"><?php echo t('home_page'); ?></div> 
    </div>
    <div id="bottom" style="background-color:#fff;text-align:centre;display:none;justify-content: center;">
      <div id="bootom-top">
        <span style="width:100%;text-align:center">技术支持 @斯科云科技</span>
        <script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
        <script>
          LA.init({
            id: "JfdLQyPJr7gH7CeO",
            ck: "JfdLQyPJr7gH7CeO"
          })
        </script>
      </div>
    </div>
</body>
<script>
  var pretime = "";
  let canvas, ctx, isDrawing = false;
   // 定义当前语言
   var currentLang = '<?php echo $lang; ?>';

    // 根据当前语言设置弹窗的 ID
  var policyPopupId = (currentLang === 'en') ? 'policyPopup-en' : 'policyPopup';
  // 显示免责声明弹窗
  function showPolicyPopup() {
    const policyPopup = document.getElementById(policyPopupId);
    const policyOverlay = document.getElementById('policyOverlay');
    policyPopup.classList.add('active');
    policyOverlay.classList.add('active');
  }
  // 关闭免责声明弹窗
  function closeDisclaimerPopup() {
    const policyPopup = document.getElementById(policyPopupId);
    const policyOverlay = document.getElementById('policyOverlay');
    policyPopup.classList.remove('active');
    policyOverlay.classList.remove('active');
  }

  // // 显示免责声明弹窗
  // function showPolicyPopup() {
  //   document.getElementById('disclaimerPopup').style.display = 'block';
  //   document.getElementById('overlay').style.display = 'block';
  // }

  // 确认免责声明
  function confirmDisclaimer() {
    closeDisclaimerPopup();
    showSignaturePopup();

  }

  // // 关闭免责声明弹窗
  // function closeDisclaimerPopup() {
  //   document.getElementById('disclaimerPopup').style.display = 'none';
  //   document.getElementById('overlay').style.display = 'none';

  //   showSignaturePopup();
  // }

  // 点击遮罩层关闭弹窗
  document.getElementById('overlay').onclick = closeDisclaimerPopup;


  // 显示球员信息弹窗
  function showPlayerInfoPopup() {
    document.getElementById('playerInfoPopup').style.display = 'block';
    document.getElementById('overlay').style.display = 'block';

    // 动态设置球员信息（可以从后端获取并填充）
    // document.getElementById('playerName').innerText = "张三"; // 替换为动态数据
    // document.getElementById('playerPhone').innerText = "12345678901"; // 替换为动态数据
    // document.getElementById('playerIdCard').innerText = "123456789012345678"; // 替换为动态数据
    // document.getElementById('playerBirthday').innerText = "2000-01-01"; // 替换为动态数据
  }

  // 确认球员信息
  function confirmPlayerInfo() {
    closePlayerInfoPopup();
  }

  // 关闭球员信息弹窗
  function closePlayerInfoPopup() {
    document.getElementById('playerInfoPopup').style.display = 'none';
    document.getElementById('overlay').style.display = 'none';


    showPolicyPopup()
  }

  // 点击遮罩层关闭弹窗
  document.getElementById('overlay').onclick = closePlayerInfoPopup;




  // 显示弹窗
  function showSignaturePopup() {
    document.getElementById('signaturePopup').style.display = 'block';
    document.getElementById('overlay').style.display = 'block';
    initCanvas();
  }

  // 初始化画布
  function initCanvas() {
    canvas = document.getElementById('signatureCanvas');
    ctx = canvas.getContext('2d');

    // 确保画布尺寸正确
    canvas.width = canvas.offsetWidth;
    canvas.height = canvas.offsetHeight;

    // 清空画布
    ctx.clearRect(0, 0, canvas.width, canvas.height);

    // 添加事件监听器
    canvas.addEventListener('mousedown', startDrawing);
    canvas.addEventListener('mousemove', draw);
    canvas.addEventListener('mouseup', stopDrawing);
    canvas.addEventListener('mouseout', stopDrawing);

    // 兼容移动设备
    canvas.addEventListener('touchstart', startDrawing, {
      passive: false
    });
    canvas.addEventListener('touchmove', draw, {
      passive: false
    });
    canvas.addEventListener('touchend', stopDrawing, {
      passive: false
    });
  }

  // 开始绘制
  function startDrawing(e) {
    e.preventDefault(); // 阻止默认行为（特别是触摸事件）
    isDrawing = true;

    const {
      offsetX,
      offsetY
    } = getEventPosition(e);
    ctx.beginPath();
    ctx.moveTo(offsetX, offsetY);
  }

  // 绘制中
  function draw(e) {
    if (!isDrawing) return;

    const {
      offsetX,
      offsetY
    } = getEventPosition(e);
    ctx.lineTo(offsetX, offsetY);
    ctx.strokeStyle = '#000';
    ctx.lineWidth = 2;
    ctx.stroke();
  }

  // 停止绘制
  function stopDrawing(e) {
    if (!isDrawing) return;
    isDrawing = false;
    ctx.closePath();
  }

  // 获取事件位置（兼容鼠标和触摸事件）
  function getEventPosition(e) {
    if (e.touches && e.touches[0]) {
      const rect = canvas.getBoundingClientRect();
      return {
        offsetX: e.touches[0].clientX - rect.left,
        offsetY: e.touches[0].clientY - rect.top
      };
    }
    return {
      offsetX: e.offsetX,
      offsetY: e.offsetY
    };
  }

  // 清空画布
  function clearCanvas() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
  }
// 添加检测画布是否为空的函数
function isCanvasBlank(canvas) {
        const blankCanvas = document.createElement('canvas');
        blankCanvas.width = canvas.width;
        blankCanvas.height = canvas.height;

        return canvas.toDataURL() === blankCanvas.toDataURL();
    }
  // 提交签名
  function submitSignature() {
    if (isCanvasBlank(canvas)) {
            alert('请先签名再提交！');
            return;
        }
    const signatureData = canvas.toDataURL('image/png');
    console.log('Signature Data:', signatureData); // 用于上传到服务器
      $.ajax({
          type: 'post',
          url:"uploadsign.php",
          data: { image: signatureData,user_id:'<?php echo $user_id;?>',type:'<?php echo $member_type;?>' },
          dataType: "json",
          success:function(req){
              //请求成功时处理
              if (req.code == 1) {
                  alert('签名提交成功！');
                  closePopup();
              }else{
                  alert(req.msg);
              }
          },
      });


  }

  // 关闭弹窗
  function closePopup() {
    document.getElementById('signaturePopup').style.display = 'none';
    document.getElementById('overlay').style.display = 'none';
  }

  // 点击遮罩层关闭弹窗
  document.getElementById('overlay').onclick = closePopup;

  function proloading() {

    $('#code0').focus();

    let storage = new Storage();
    let value = storage.getItem('ischeked');
    if (value == 1) {
      $('#fullloading').hide();
    } else {
      let storage = new Storage();
      storage.setItem({
        name: "ischeked",
        value: 1,
        expires: 1 * 24 * 3600 * 1000, //一周 默认
        startTime: new Date().getTime() //记录何时将值存入缓存，毫秒级
      })
      pretime = setTimeout(function() {
        $('#fullloading').fadeOut(2000);

      }, 2000);

    }
  }


  function closefullpre() {
    //console.log($('#fullloading'));
    $('#fullloading').fadeOut(1000);

    clearTimeout(pretime);
  }
</script>

</html>
